package br.com.egg.finances.model;

public class Entity {
	
	private static final Character INSERT = Character.valueOf('I');
	private static final Character UPDATE = Character.valueOf('U');
	private static final Character DELETE = Character.valueOf('D');
	private static final Character UNMODIFIED = Character.valueOf(' ');
	
	private Character status;

	public Entity() {
		super();
		setStatusUnmodified();
	}
	
	public void setStatusInsert() {
		status = INSERT;
	}
	
	public void setStatusUpdate() {
		status = UPDATE;
	}
	
	public void setStatusDelete() {
		status = DELETE;
	}
	
	public void setStatusUnmodified() {
		status = UNMODIFIED;
	}
	
	public boolean isStatusInsert() {
		return INSERT.equals(status);
	}
	
	public boolean isStatusUpdate() {
		return UPDATE.equals(status);
	}
	
	public boolean isStatusDelete() {
		return DELETE.equals(status);
	}
	
	public boolean isStatusUnmodified() {
		return UNMODIFIED.equals(status);
	}
	
}
